<html>
  <head>
    <title>Edit User</title>
   	<script src="./lib/jquery.js" ></script>
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<script language="JavaScript" SRC="config.js"></script>
	<link rel="stylesheet" href="./lib/jquery.mobile-1.1.1.min.css" />
	<script src="./lib/jquery-1.7.1.min.js"></script>
	<script src="./lib/jquery.mobile-1.1.1.min.js"></script>
	<script type="text/javascript" charset="utf-8">
	 var query = window.location.search;
	 alert(window.location.search);
  // Skip the leading ?, which should always be there, 
  // but be careful anyway
  if (query.substring(0, 1) == '?') 
  {
    query = query.substring(1);
  }
  var data = query.split('?'); 
   alert(data[0]);
  for (i = 0; (i < data.length); i++) 
  {
    data[i] = unescape(data[i]);
    //data[i]=data[i].replace('userid=','');
  }
	data[0]=data[0].replace('userid=','');
	data[1]=data[1].replace('level_id=','');//level id
	data[2]=data[2].replace('title=','');//title
	function appendtitle()
	{
	 $('#title').append('<h3>'+data[2]+'</h3>');
	}
 function get(){
 		 alert("get is called");
 		
 			 alert("post data to server");
	        $.post('http://'+serverip+'/socialengine/mobileservice/edituser/confirmedituserlevel', {userid:data[0],level_id: data[1]},
	            function(output){
	               alert(output.result);
	            },"json");
    };
    function goBack()
    {
    	 window.location='edituserlevel.html?'+'userid='+data[0];
    }
    </script>
  </head>
<body onload="appendtitle()">

<div data-role="page" id="header">
<div data-role="header">
<a href="index.html" data-role="button" data-icon="home" data-iconpos="notext" rel="external">Home</a>
<h1>Edit User</h1>
</div>
<div data-role="content">
<p> Change level of this user to </p>
<div data-role="content" id="title">
</div>
<form name="form" id="form">
    <input type="button" value="Yes" onClick="get();">
    <input type="button" value="No" onClick="goBack();" />
</form>
</div>
<div data-role="footer">
<h4>Footer</h4>

</div>
</body>
</html>